< previous page page_233 next page >

Page 233
However, if you give your users the ability to change colors, they can customize the colors so they dont conflict with their system colors. You can do this by using the Color dialog box, as shown in Figure 11.11.
8160-0233a.gif
Figure 11.11
The Color dialog box.
This Color dialog box is generated by using the following code:
9f31265bb40b592b1929e18a47ab28e5.gif
Private Sub cmdColor_Click()
   ' Reset the Flags
   cdlCommon.Flags = cdlCCFullOpen

   ' Display the Color dialog box
   cdlCommon.ShowColor

   ' Fill in the background color with
   ' the color from the common dialog
   lblColor.BackColor = cdlCommon.Color
End Sub
The Flags property is set to cdlCCFullOpen so you get the full dialog box. If you dont set this flag, you wont see the custom colors on the right side of the dialog box. The only other Flag option you may set is cdlCCPreventFullOpen. If you set the Flag property to this value, the user wont be allowed to select the Define Custom Colors command button.

 
< previous page page_233 next page >

If you like this book, buy it!